package edu.gatech.volt2.drdoommgt.domain;
/**
 * This class represents insurance information.
 * 
 * @author Perron Jones
 */
public class Insurance 
{

	private String companyName;
	private String policyID;
	private String groupID;
	private String phone;
	private Address address;
	
	/**
	 * This default constructor sets the metadata of the insurance to
	 * customized default values.
	 */
	public Insurance()
	{
		this.companyName= "N/A";
		this.policyID= "N/A";
		this.groupID= "N/A";
		this.phone= "N/A";
		this.address= new Address();
	}
	
	/**
	 * This constructor sets the metadata of the insurance information to the information
	 * that is passed into it.
	 * 
	 * @param companyName the name of the insurance company
	 * @param policyID the policy ID of the insurance
	 * @param groupID the group ID of the insurance
	 * @param contactInformation the contact information for the insurance
	 * @param address the address of the insurance provider
	 */
	public Insurance(String companyName, String policyID, String groupID, String phone, Address address)
	{
		this.companyName= (companyName == null ? "N/A" : companyName);
		this.policyID= (policyID == null ? "N/A" : policyID);
		this.groupID= (groupID == null ? "N/A" : groupID);
		this.phone= (phone == null ? "N/A" : phone);
		this.address= (address == null ? new Address() : address);	
	}
	
	/**
	 * This method creates a string representation of the insurance information.
	 * 
	 * @return a string representation of the insurance information
	 */
	public String toString()
	{
		String insurance= "Company name: " + this.companyName + "\nPolicy ID: " + this.policyID + "\nGroup ID: " +
			this.groupID + "\nPhone:\n" + this.phone+ "\nAddress:\n" + address.toString() + "\n";
			
		return insurance;
	}
	
	/**
	 * @param companyName the name of the insurance provider/company to set
	 */
	public void setCompanyName(String companyName)
	{
		this.companyName = companyName;
	}
	
	/**
	 * @return the name of the insurance provider/company
	 */
	public String getCompanyName()
	{
		return companyName;
	}
	
	/**
	 * @param policyID the policy ID of the insurance to set
	 */
	public void setPolicyID(String policyID)
	{
		this.policyID = policyID;
	}
	
	/**
	 * @return the policy ID of the insurance
	 */
	public String getPolicyID()
	{
		return policyID;
	}
	
	/**
	 * @param groupID the group ID of the insurance to set
	 */
	public void setGroupID(String groupID)
	{
		this.groupID = groupID;
	}
	
	/**
	 * @return the group ID of the insurance
	 */
	public String getGroupID()
	{
		return groupID;
	}
	
	/**
	 * @param contactInformation the contact information of the insurance to set
	 */
	public void setPhone(String phone)
	{
		this.phone = phone;
	}
	
	/**
	 * @return the contact information of the insurance
	 */
	public String getPhone()
	{
		return phone;
	}
	
	/**
	 * @param address the address of the insurance provider/company to set
	 */
	public void setAddress(Address address)
	{
		this.address = address;
	}
	
	/**
	 * @return the address of the insurance provider/company
	 */
	public Address getAddress()
	{
		return address;
	}
	
}
